package entitiesIds;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LanguageitemId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LanguageitemId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 7234970684997295146L;
	private Integer idItem;
	private String abb;

	// Constructors

	/** default constructor */
	public LanguageitemId() {
	}

	/** full constructor */
	public LanguageitemId(Integer idItem, String abb) {
		this.idItem = idItem;
		this.abb = abb;
	}

	// Property accessors

	@Column(name = "idItem", nullable = false)
	public Integer getIdItem() {
		return this.idItem;
	}

	public void setIdItem(Integer idItem) {
		this.idItem = idItem;
	}

	@Column(name = "abb", nullable = false, length = 5)
	public String getAbb() {
		return this.abb;
	}

	public void setAbb(String abb) {
		this.abb = abb;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LanguageitemId))
			return false;
		LanguageitemId castOther = (LanguageitemId) other;

		return ((this.getIdItem() == castOther.getIdItem()) || (this
				.getIdItem() != null && castOther.getIdItem() != null && this
				.getIdItem().equals(castOther.getIdItem())))
				&& ((this.getAbb() == castOther.getAbb()) || (this.getAbb() != null
						&& castOther.getAbb() != null && this.getAbb().equals(
						castOther.getAbb())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getIdItem() == null ? 0 : this.getIdItem().hashCode());
		result = 37 * result
				+ (getAbb() == null ? 0 : this.getAbb().hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "LanguageitemId [idItem=" + idItem + ", abb=" + abb + "]";
	}

	
}